package com.aitoedu.server.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.aitoedu.server.entity.PreviewStatus;
import com.aitoedu.server.service.PreviewStatusService;
import com.aitoedu.server.mapper.PreviewStatusMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 曹正豪
* @description 针对表【preview_status(预习状态表)】的数据库操作Service实现
* @createDate 2024-10-19 23:11:18
*/
@Service
public class PreviewStatusServiceImpl extends ServiceImpl<PreviewStatusMapper, PreviewStatus>
    implements PreviewStatusService{

    @Autowired
    private PreviewStatusMapper previewStatusMapper;
    @Override
    public void setOne(Long psId) {
        PreviewStatus previewStatus = PreviewStatus.builder()
                .preStatus(1)
                .id(psId)
                .build();
        previewStatusMapper.updateById(previewStatus);
    }
}




